<script>
	import { inject } from "vue";

	export default {
		setup() {
            // 接收父辈组件全局透传下来的location 为空时默认使用The Universe
			const userLocation = inject("location", "The Universe");
			const userGeolocation = inject("geolocation");

			return {
				userLocation,
				userGeolocation,
			};
		},
	};
</script>

<template>
    <h3>MyMarker</h3>
    <p>userLocation:{{userLocation}}</p>
    <p>userGeolocation:{{userGeolocation}}</p>
</template>